package com.by.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ServivE
 * @version 0.1
 * @className GoodsController
 * @description
 * @date 2024/10/28 17:59
 * @since jdk17
 */
@RestController
@RequestMapping("/api")
public class GoodsController {

    @GetMapping("/goods")
    public String update(@RequestParam("goodsId") int goodsId, @RequestParam("num") int num) {
        System.out.println("商品id:" + goodsId + " 数量:" + num);
        return "更新库存成功";
    }
}
